package org.example.designpattern.visitor;

import com.google.common.collect.Lists;

import java.util.List;

public class Reporter {

    private static List<Staff> staffList = Lists.newArrayList();

    static {
        staffList.add(new Developer("开发-1"));
        staffList.add(new Developer("开发-2"));
        staffList.add(new Developer("开发-3"));
        staffList.add(new Product("产品-1"));
        staffList.add(new Product("产品-2"));
    }

    public static void report(Visitor visitor) {
        staffList.forEach(i -> i.accept(visitor));
    }
}
